home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / comm / mail / YAMscripts.lha / DeleteFolder.rexx < prev    next >
OS/2 REXX Batch file  |  1997-02-17  |  660b  |  25 lines

  1. /* DeleteFolder.rexx 1.0 - Quickly deletes all messages in the current folder.
  2. ** Send comments and suggestions to knikulai@utu.fi
  3. ** Check http://www.utu.fi/~knikulai/ARexx.html for many more useful scripts */
  4. options results
  5.  
  6. conf='yes' /* Set to yes, if you want a confimation requester! */
  7.  
  8. address 'YAM' 
  9. if upper(conf)='YES' then do
  10.     'GetFolderInfo name'
  11.     'Request "Delete all messages in folder' result'?" "_Yes, do it!|_No way!"'
  12.     if result=0 then exit
  13.     end
  14.  
  15. name=result
  16. 'GetFolderInfo path'
  17. path=result
  18. if rc=0 then do
  19.     if pos(':',path)=0 then path='YAM:'path
  20.     path=path'/#?'
  21.     address command 'Delete >nil:' path
  22.     address 'YAM' 'MailUpdate'
  23.     end
  24. exit
  25.